﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="SelectedTask.aspx.cs" Inherits="TimeManagementSystem.Tasks.SelectedTask" %>
<%@ Import Namespace="TimeManagementSystem" %>
<%@ MasterType VirtualPath="~/Main.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="/Resources/css/SelectedTask.css"/>
    <script type="text/javascript" src="/Resources/js/SelectedTask.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div id="content">
        <%var id = Convert.ToInt32(Request.QueryString["taskId"]);
          var task = Global.inputValid.dao.GetTaskById(id);
          if (task == null) {       %>
            <div id="notFound"></div>
            <%} else
              { %>
            <div id ="taskHeader" class="header"><%=task.Name %> </div>
            <div id ="goalTxt" class="txt">
                <span>Goal:</span>
                <span><%=Global.inputValid.dao.GetGoalById(task.Goal).Name %></span>
            </div>
            <div id ="statusTxt" class="txt">
                <span>Status:</span>
                <span><%=task.Status %></span>
            </div>
            <div id ="startDateTxt" class="txt">Start Date: </div>
            <input type ="text" class ="date" id ="startDate" value ="<%=task.StartDate %>"/>
            <div id ="finishDateTxt" class="txt">Finish Date: </div>
            <input type ="text" class ="date" id ="finishDate" value ="<%=task.FinishDate %>"/>
            <div id ="descriptionTxt" class="txt">Description: </div>
            <div id="editDescription">[edit]</div>
            <asp:TextBox ID="tbxTinymce" CssClass="mcetiny" runat="server"></asp:TextBox>
            <div id ="bugHeader" class="header">Bugs </div>
            <%} %>
        </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
    
